package com.yet.utils;

import com.yet.annotation.RpcService;
import com.yet.container.registry.RegistryMeta.ServiceMeta;

public class BeanNameUtils {

	private BeanNameUtils() {
		super();
	}

	public static String getName(RpcService rpcService) {
		return getName(rpcService.serviceName(), rpcService.version());
	}

	public static String getName(ServiceMeta serviceMeta) {
		return getName(serviceMeta.getName(), serviceMeta.getVersion());
	}

	public static String getName(String serviceName, String version) {
		return serviceName + "-" + version;
	}

}
